/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.bean.User;
/*    */ import com.newcrm.db.CustomerFieldManager;
/*    */ import com.newcrm.db.DealFieldManager;
/*    */ import com.newcrm.db.VOIPCallManager;
/*    */ import com.newcrm.exception.DBException;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.sql.SQLException;
/*    */ import java.util.Date;
/*    */ import java.util.List;
/*    */ import javax.servlet.RequestDispatcher;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ 
/*    */ public class ListCustomers extends AbstractAction
/*    */ {
/*    */   public ListCustomers(AbstractHttpServlet servlet)
/*    */   {
/* 25 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 35 */     User user = super.getLoginUser(request);
/* 36 */     CustomerFieldManager manager = new CustomerFieldManager();
/*    */ 
/* 38 */     DealFieldManager dealFieldManager = new DealFieldManager();
/*    */     try {
/* 40 */       List dealFields = dealFieldManager
/* 41 */         .list(user.companyId);
/* 42 */       request.setAttribute("dealFields", dealFields);
/* 43 */       List fields = manager.listAll(user.companyId);
/* 44 */       request.setAttribute("fields", fields);
/*    */     } catch (DBException e) {
/* 46 */       e.printStackTrace();
/*    */     } catch (SQLException e) {
/* 48 */       e.printStackTrace();
/*    */     }
/*    */ 
/* 51 */     request.setAttribute("notContactType", 
/* 52 */       request.getParameter("notContactType"));
/*    */ 
/* 55 */     request.setAttribute("tagId", request.getParameter("tagId"));
/*    */ 
/* 58 */     request.setAttribute("nextDate", request.getParameter("nextDate"));
/*    */ 
/* 61 */     request.setAttribute("contactDate", request.getParameter("contactDate"));
/* 62 */     request.setAttribute("importId", request.getParameter("importId"));
/*    */ 
/* 65 */     VOIPCallManager voipCallManager = new VOIPCallManager();
/* 66 */     Date syncTime = voipCallManager.getLastSynchronousTime(user.companyId);
/* 67 */     request.setAttribute("syncTime", syncTime);
/*    */ 
/* 69 */     request.getRequestDispatcher("/parties.jsp").forward(request, response);
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.ListCustomers
 * JD-Core Version:    0.6.1
 */